
package com.gzbsoft.sc.modules.sys.entity;
import com.fasterxml.jackson.annotation.JsonBackReference;
import io.ebean.annotation.DbComment;
import io.ebean.annotation.DocStore;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import java.util.Date;
@DocStore
@EqualsAndHashCode(callSuper = true)
@Entity
@Data
@Table(name = "sys_user_token")
@DbComment("系统用户token")
public class SysUserToken extends BaseEntity {
    @JsonBackReference
    @OneToOne
    @JoinColumn(name = "sys_user_id")
    private SysUser user;
    private String token;
    @DbComment("过期时间")
    private Date expireTime;
    @Override
    public String toString() {
        return "SysUserToken{" +
                "user=" + user +
                ", token='" + token + '\'' +
                ", expireTime=" + expireTime +
                '}';
    }
}
